﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Architecture;
using YJKSparseDistance.ModelLayer;
using YJKSparseDisOfRoom.Properties;
using YJKInspectModelFunc.ModelLayer;

namespace YJKSparseDisOfRoom.ModelLayer
{
	public class EndPointPacker_InRoom : EndPointPacker
	{
		public Area ThisArea
		{
			get
			{
				return this.m_thisArea;
			}
			private set
			{
				this.m_thisArea = value;
			}
		}

		public EndPointPacker_InRoom(BaseElementPacker thisElementPacker, Area inputArea, Room useRoom, XYZ useEndPoint, bool ifStartPoint = true, bool ifSparay = false) : base(thisElementPacker, useRoom, useEndPoint, null, ifStartPoint, ifSparay, false)
		{
			this.ThisArea = inputArea;
			base.IfFinalEnd = true;
		}

		public override double GetFactoryAndSubValue(out double subValue)
		{
			subValue = 0.0;
			if (base.IfSparay)
			{
				return double.Parse(Resources.str_ValueOfSpairFactory);
			}
			return double.Parse(Resources.str_One);
		}

		private Area m_thisArea;
	}
}
